Implementation Tricks in the Hungarian Babel Module

نویسنده

  • Péter Szabó
چکیده

magyar.ldf, the Hungarian Babel module, was rewritten in the autumn of 2003 to obey most of the Hungarian typographical rules. This article describes some implementation issues, TEX macro programming hacks, and LATEX typesetting trickery used in magyar.ldf. All features of the new magyar.ldf are enumerated, but only those having an interesting implementation are presented in detail. Most of the tricks shown are useful for developing other language modules. The Name of the Language Usually a Babel language module has the English name of that language. For example, the German module is called germanb.ldf, and not deutsch.ldf. The Hungarian module is an exception to this rule, because it has the name magyar.ldf, in which “magyar” is the Hungarian adjective meaning “Hungarian”. A similar exception is portuges.ldf for Portuguese. The letter “a” in word magyar has to be pronounced as in blah, and the consonant “gy” is the same as “d” in due. The name of a language that a Babel language module (.ldf file) defines is usually specified as an argument of \LdfInit in the file. Thus, if czech.ldf is renamed to foo.ldf, it will have to be loaded with \usepackage[foo]{babel}, but to activate it, \selectlanguage{czech} should be used. This is not the case with magyar.ldf, because it detects its loaded filename using the \CurrentOption macro set by the \ProcessOptions command called from babel.sty. So whatever magyar.ldf is renamed to, that name is the one to pass to \selectlanguage. The only reason why someone may want to rename an .ldf file is to load two different versions in the same LATEX run. This is possible withmagyar.ldf, but the user should be aware that the control sequences defined by the two copies will interact with each other in an unpredictable way. Experiments have shown that it is possible to load two copies of magyar.ldf with different load options (this is the so-called dual load): \PassOptionsToPackage{frenchspacing=yes} {magyar.ldf} \PassOptionsToPackage{frenchspacing=no} {hungarian.ldf} \usepackage[hungarian,magyar]{babel} Despite the name hungarian.ldf above, the file magyar.ldf gets loaded twice, because Babel translates the language name hungarian to file name magyar.ldf, and magyar.ldf expects options for \CurrentOption.ldf, which depends on the language name passed to \usepackage[...]{babel}. Since the dual load feature of magyar.ldf is experimental, most of the load options cannot be different in the two copies. So the safest way to load two copies is to replace the occurrences of the word magyar in the second copy with something else. The latest magyar.ldf (version 1.5) is not part of standard Babel yet, but it is available as part of MagyarLTEX (see section ?!?). Most of the typographical rules it tries to obey and problems it addresses were proposed in [1]. What an .ldf File Contains An .ldf file is a Babel language module, which contains specific macros for the given language. It is loaded by babel.sty in the document preamble, at the time babel.sty itself is loaded. The macros defined in foo.ldf take effect only after changing the language with \selectlanguage{foo}. The default language is the one specified last in the \usepackage[...] {babel} command. Babel itself contains the standard versions of the .ldf files as tex/generic/babel/*.ldf. In Babel 3.7 there are 41 of them; most are smaller than 10 kB. The largest files are: the old magyar.ldf defining the Hungarian language (25 kB), frenchb.ldf TUGboat, Volume 0 (2060), No. 0—Proceedings of the 2060 Annual Meeting 1001

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Babel

Routing and switching capabilities of computer networks seem as the closed environment containing a limited set of deployed protocols, which nobody dares to change. The majority of wired network designs are stuck with OSPF (guaranteeing dynamic routing exchange on network layer) and RSTP (securing loop-free data-link layer topology). Recently, more use-case specific routing protocols, such as B...

متن کامل

Honest Compositions in a Babel-fish Generation

Today as educators we have no illusions about the easy availability of translation engines, and we should not be so naïve as to think that students won’t use them simply because we ask them not to. Let’s face it: they are readily accessible, they cost nothing, and they provide nearly instantaneous results. They have come a long way from anything you or I are likely to have played with in the 19...

متن کامل

Babel: A Version Management System for the Java Programming Language

For the deployment of large software systems powerful mechanisms for module and version management are essential. For both areas, the popular Java programming language, however, provides only limited support. Module management is supported by means of Java’s package and jar file mechanisms which is mostly a packaging mechanism that just allows to amend packages in a jar file with some meta info...

متن کامل

The First ALS Ambulance in the World

The survival rate of medical emergencies depends highly on the intervention time and prompt medical care on the scene. The idea of “bring the doctor and medical equipment to the spot” was born in Hungary in the mid-1950s. The demand for advanced life support was a consequence of the fast growth of industry and traffic. It is worthwhile to review the development of the idea, the therapeutic meth...

متن کامل

Assignment problem and its application in Nigerian institutions: Hungarian method approach

Assignment model is a powerful operations research techniques that can be used to solve assignment or allocation problem. This study applies the assignment model to the course allocation problem in Nigeria tertiary institution in order to maximize lecturers’ effectiveness. A well-structured questionnaire was used to obtain data from lecturers and solved with Hungarian method. The study revealed...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2004